package com.sunhao.gulimall.search.vo;

import com.sunhao.common.to.es.SkuEsModel;
import lombok.Data;

import java.util.List;

/**
 * 描述：SearchResponse 类的用途:查询返回的结果
 * 日期：2024/12/2
 */
@Data
public class SearchResult {
    //查询的所有商品
    private List<SkuEsModel> products;

    /**
     * 分页信息
     */
    //当前页码
    private Integer pageNum;
    //总记录数
    private Long total;
    //总页码
    private Integer totalPages;

    //导航栏页码
    private List<Integer> pageNavs;

    //当前查询到的结果 所涉及到的品牌
    private List<BrandVo> brands;

    //当前查询结果涉及到的所有属性
    private List<AttrVo> attrs;

    //当前查询涉及的所有分类
    private List<CatalogVo> catalogs;

    @Data
    public static class BrandVo
    {
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class AttrVo
    {
        private Long attrId;
        private String attrName;
        private List<String> attrValue;
    }

    @Data
    public static class CatalogVo
    {
        private Long catalogId;
        private String catalogName;
    }
}
